<?php
require_once 'classes/Login.php';
$Login = new Login;
include 'includes/header.inc.php';
?>
			
			<?php if(isset($_GET['email']) && (isset($_GET['reset']))) : ?>
				
			<script type="text/javascript">
				var emailVariable = "<?php echo $_GET['email']; ?>";
			</script>
				
			<?php if($validate = $Login->validateResetInfo($_GET['email'],$_GET['reset'])) : ?>
				<div id="form">
					<h1>Password Reset: <?php echo $_GET['email']; ?></h1>
					<fieldset id="newPasswordForm">
						<form method="post" action="process.php?action=changePassword">
							<p>
								<label for="re-password">Password: </label>
								<input type="password" name="re-password" id="re-password" class="input" value=""/>
							</p>
							<p>
								<label for="re-password-2">Retype Password: </label>
								<input type="password" name="re-password-2" id="re-password-2" class="input" value=""/>
							</p>
							<p>
								<input type="submit" name="login" id="renew-password" class="button" value="Change" />
							</p>
						</form>
					</fieldset>
					<div id="loading"><img src="/sandbox1/media/images/loader.gif" alt="Loading..." /></div>
					<div id="feedback"></div>
				</div><!-- end form -->
			<?php else: ?>
				<meta http-equiv="refresh" content="0; url=/index.php" />
				<?php die(); ?>
			<?php endif; ?>
			
			<?php else: ?>
				<div id="form">
					<h1>Forgot Password</h1>
					<fieldset id="forgotPasswordForm">
						<form method="post" action="process.php?action=forgotPassword">
							<p>
								<label for="forgot-email">Email Address: </label>
								<input type="text" name="email" id="forgot-email" class="input" value=""/>
							</p>
							<p>
								<input type="submit" name="login" id="forgot-password" class="button" value="Retrieve" />
							</p>
						</form>
					</fieldset>
					<div id="loading"><img src="/sandbox1/media/images/loader.gif" alt="Loading..." /></div>
					<div id="feedback"></div>
				</div><!-- end form -->
			<?php endif; ?>
<?php include 'includes/footer.inc.php'; ?>